<h3><?php echo $title; ?></h3>



<div class="search_control">

<?php

/*	echo form_open('admin/customer/search');

  //search field

  $data = array('name' => 'search', 'value' => '', 'id' => 'search');	

  echo form_submit($data);

  $data = array('name' => 'keyword', 'value' => '', 'class' => 'keyword');

  echo form_input($data);

  //Type

  $options = array(

		'id' => 'ID',

    'full_name' => 'Full Name',

	);

	echo form_dropdown('search_type', $options);

	echo form_close();
*/
?>

</div><!--search_control end-->
<?php echo form_open('admin/customer/request'); ?>

<div class="control1">

<?php

	//add button

  echo link_image('admin/customer/create', 'images/admin/button_add.png');

  

  //delete button

  $data = array('name' => 'delete', 'value' => '', 'id' => 'delete');

  echo form_submit($data);

 

  //show field

  $data = array('name' => 'show', 'value' => '', 'id' => 'show');	

  echo form_submit($data);
//$_SESSION['row_number']
  $data = array('name' => 'row_number', 'value' => $_SESSION['row_number'], 'id' => 'show_number');	

  echo form_input($data);

?>

</div><!--control1 end-->
<table class="default">
<?php

	if (is_array($result) )

	{

		//title

		echo '<tr>';

		echo '<th width="50" >';
			echo '&nbsp;',form_checkbox('all'),'&nbsp;All';
		echo '</th>';


  

    echo '<th width="70">Mã KH</th>';

		echo '<th width="100">Họ Tên</th>';
		echo '<th width="150">mã thẻ thành viên</th>';


		echo '<th width="100">Info</th>';

		echo '</tr>';

		

		//print

		foreach ($result as $row)

		{

			echo '<tr>';



			//action

			echo '<td>';

			echo form_checkbox('select_id[]', $row['id']);

			echo '&nbsp;';

			echo anchor('admin/customer/update/'.$row['id'], 'Edit');

			echo '</td>';



      //Code

			echo '<td>';

      echo $row['id'];

			echo '</td>';



			//name

			echo '<td class="align_left">';
		$name = unserialize($row['name']);
		//echo $name;		
	
   // $holot = html_entity_decode($row['last_name'], ENT_QUOTES, 'UTF-8');
   // $ten = html_entity_decode($row['first_name'], ENT_QUOTES, 'UTF-8');
    $ten = html_entity_decode($name['full'], ENT_QUOTES, 'UTF-8');
	echo $ten;

	//		echo $holot.' '.$ten;

			echo '</td>';			
	echo '<td class="align_left">';
	echo $row["member_card"];
	echo '</td>';	
			//Info

			echo '<td>';

			echo mailto($row['email'], 'Email');

      echo '&nbsp;'.anchor('#', 'Phone', 'title="'.$row['phone'].'"');

			echo '</td>';

			

			echo '</tr>';

		}

	}

	else

	{

		echo 'Data does not exist';

	}

?>

</table><!--end main content-->



<?php

	echo form_close(); //FORM END

	

	//page
	
	echo '<div class="page">'.$page.'</div>';

?>